package co.com.inventarios.modelo;

import java.sql.Timestamp;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Probodega entity.
 * 
 * @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "PROBODEGA", schema = "MANAGER", uniqueConstraints = {})
public class Probodega implements java.io.Serializable {

	// Fields

	private ProbodegaId id;
	private Bodega bodega;
	private Producto producto;
	private Unimed unimed;
	private Double pbdexiste;
	private Double pbdcomprm;
	private Double pbdcompent;
	private Double pbdstokmin;
	private Double pbdstokmax;
	private String pbdubica;
	private Long pbdactivo;
	private Timestamp pbdlogfec;
	private Dlluser dlluser;
	// Constructors

	/** default constructor */
	public Probodega() {
	}

	/** minimal constructor */
	public Probodega(ProbodegaId id, Bodega bodega, Producto producto,
			Unimed unimed, Double pbdexiste,Double pbdcomprm) {
		this.id = id;
		this.bodega = bodega;
		this.producto = producto;
		this.unimed = unimed;
		this.pbdcomprm = pbdcomprm;
		this.pbdexiste = pbdexiste;
	}

	/** full constructor */
	public Probodega(ProbodegaId id, Bodega bodega, Producto producto,
			Unimed unimed, Double pbdexiste,Double pbdcomprm,Double pbdcompent, Double pbdstokmin,
			Dlluser dlluser,Timestamp pbdlogfec,
			Double pbdstokmax, String pbdubica, Long pbdactivo) {
		this.id = id;
		this.pbdlogfec = pbdlogfec;
		this.dlluser = dlluser;
		this.bodega = bodega;
		this.producto = producto;
		this.unimed = unimed;
		this.pbdexiste = pbdexiste;
		this.pbdstokmin = pbdstokmin;
		this.pbdstokmax = pbdstokmax;
		this.pbdubica = pbdubica;
		this.pbdcomprm = pbdcomprm;
		this.pbdcompent = pbdcompent;
		this.pbdactivo = pbdactivo;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "pbdempresa", column = @Column(name = "PBDEMPRESA", unique = false, nullable = false, insertable = true, updatable = true, length = 3)),
			@AttributeOverride(name = "pbdproduct", column = @Column(name = "PBDPRODUCT", unique = false, nullable = false, insertable = true, updatable = true, length = 15)),
			@AttributeOverride(name = "pbdcuenta", column = @Column(name = "PBDCUENTA", unique = false, nullable = false, insertable = true, updatable = true, length = 20)),
			@AttributeOverride(name = "pbdbodega", column = @Column(name = "PBDBODEGA", unique = false, nullable = false, insertable = true, updatable = true, length = 15)) })
	public ProbodegaId getId() {
		return this.id;
	}

	public void setId(ProbodegaId id) {
		this.id = id;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "PBDBODEGA", unique = false, nullable = false, insertable = false, updatable = false)
	public Bodega getBodega() {
		return this.bodega;
	}

	public void setBodega(Bodega bodega) {
		this.bodega = bodega;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "PBDPRODUCT", unique = false, nullable = false, insertable = false, updatable = false)
	public Producto getProducto() {
		return this.producto;
	}

	public void setProducto(Producto producto) {
		this.producto = producto;
	}

	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "PBDUNIMED", unique = false, nullable = false, insertable = true, updatable = true)
	public Unimed getUnimed() {
		return this.unimed;
	}

	public void setUnimed(Unimed unimed) {
		this.unimed = unimed;
	}

	@Column(name = "PBDEXISTE", unique = false, nullable = false, insertable = true, updatable = true, precision = 15, scale = 4)
	public Double getPbdexiste() {
		return this.pbdexiste;
	}

	
	@ManyToOne(cascade = {}, fetch = FetchType.LAZY)
	@JoinColumn(name = "PBDLOGUSER", unique = false, nullable = true, insertable = true, updatable = true)
	public Dlluser getDlluser() {
		return this.dlluser;
	}

	public void setDlluser(Dlluser dlluser) {
		this.dlluser = dlluser;
	}

	@Column(name = "PBDLOGFEC", unique = false, nullable = true, insertable = true, updatable = true)
	public Timestamp getPbdlogfec() {
		return this.pbdlogfec;
	}

	public void setPbdlogfec(Timestamp pbdlogfec) {
		this.pbdlogfec = pbdlogfec;
	}
	
	
	public void setPbdexiste(Double pbdexiste) {
		this.pbdexiste = pbdexiste;
	}

	@Column(name = "PBDCOMPRM", unique = false, nullable = false, insertable = true, updatable = true, precision = 15, scale = 4)
	public Double getPbdcomprm() {
		return this.pbdcomprm;
	}
	
	public void setPbdcompent(Double pbdcompent) {
		this.pbdcompent = pbdcompent;
	}
	
	@Column(name = "PBDCOMPENT", unique = false, nullable = false, insertable = true, updatable = true, precision = 15, scale = 4)
	public Double getPbdcompent() {
		return this.pbdcompent;
	}

	public void setPbdcomprm(Double pbdcomprm) {
		this.pbdcomprm = pbdcomprm;
	}
	
	
	@Column(name = "PBDSTOKMIN", unique = false, nullable = true, insertable = true, updatable = true, precision = 12)
	public Double getPbdstokmin() {
		return this.pbdstokmin;
	}

	public void setPbdstokmin(Double pbdstokmin) {
		this.pbdstokmin = pbdstokmin;
	}

	@Column(name = "PBDSTOKMAX", unique = false, nullable = true, insertable = true, updatable = true, precision = 12)
	public Double getPbdstokmax() {
		return this.pbdstokmax;
	}

	public void setPbdstokmax(Double pbdstokmax) {
		this.pbdstokmax = pbdstokmax;
	}

	@Column(name = "PBDUBICA", unique = false, nullable = true, insertable = true, updatable = true, length = 15)
	public String getPbdubica() {
		return this.pbdubica;
	}

	public void setPbdubica(String pbdubica) {
		this.pbdubica = pbdubica;
	}

	@Column(name = "PBDACTIVO", unique = false, nullable = true, insertable = true, updatable = true, precision = 22, scale = 0)
	public Long getPbdactivo() {
		return this.pbdactivo;
	}

	public void setPbdactivo(Long pbdactivo) {
		this.pbdactivo = pbdactivo;
	}

}